package com.jbm.jsm.iface;

import com.jbm.core.iface.IAcross;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/9/26.
 */
@Entity
@Table(name = "task_geo", schema = "", catalog = "jsm")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class TaskGeoEntity extends IAcross
{
    public TaskGeoEntity()
    {
        super();
    }

    public TaskGeoEntity(IAcross ia)
    {
        super(ia);
    }

    private int tgId;
    private Integer tId;
    private Integer giId;
    private Timestamp createDate;
    private Integer createId;

    @Id
    @Column(name = "tg_id")
    @GeneratedValue
    public int getTgId() {
        return tgId;
    }

    public void setTgId(int tgId) {
        this.tgId = tgId;
    }

    @Basic
    @Column(name = "t_id")
    public Integer gettId() {
        return tId;
    }

    public void settId(Integer tId) {
        this.tId = tId;
    }

    @Basic
    @Column(name = "gi_id")
    public Integer getGiId() {
        return giId;
    }

    public void setGiId(Integer giId) {
        this.giId = giId;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "create_id")
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaskGeoEntity that = (TaskGeoEntity) o;

        if (tgId != that.tgId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (createId != null ? !createId.equals(that.createId) : that.createId != null) return false;
        if (giId != null ? !giId.equals(that.giId) : that.giId != null) return false;
        if (tId != null ? !tId.equals(that.tId) : that.tId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = tgId;
        result = 31 * result + (tId != null ? tId.hashCode() : 0);
        result = 31 * result + (giId != null ? giId.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (createId != null ? createId.hashCode() : 0);
        return result;
    }
}
